﻿Imports System.IO

Public Class frmListDirectories

    '#Region "Function"

    '    Private Sub SaveFile()
    '        If lstDirectories.Items.Count = 0 Then
    '            File.Delete(Application.StartupPath & cDataFileName)
    '        End If

    '        Dim oWriter As New IO.StreamWriter(PutSlash(Application.StartupPath) & cDataFileName)

    '        For i As Integer = 0 To lstDirectories.Items.Count - 1
    '            oWriter.WriteLine(PutSlash(lstDirectories.Items(i)))
    '        Next
    '        oWriter.Close()

    '        oWriter = Nothing
    '    End Sub

    '#End Region

    '#Region "Commands"

    '    Private Sub cmdClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdClose.Click
    '        Me.DialogResult = Windows.Forms.DialogResult.Cancel
    '    End Sub

    '    Private Sub cmdAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAdd.Click
    '        Dim strValue As String = InputBox("Insert directory", Me.Text)
    '        If strValue <> "" Then
    '            lstDirectories.Items.Add(strValue)
    '        End If
    '        Call savefile()
    '    End Sub

    '    Private Sub lstDirectories_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles lstDirectories.KeyDown
    '        If e.KeyCode = Keys.Cancel Or e.KeyCode = Keys.Delete Then
    '            lstDirectories.Items.RemoveAt(lstDirectories.SelectedIndex)
    '        End If
    '        Call SaveFile()
    '    End Sub

    '#End Region

    '#Region "Events form"

    '    Private Sub me_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
    '        If e.KeyCode = Keys.Escape Then
    '            Me.DialogResult = DialogResult.Cancel
    '        End If
    '    End Sub

    '    Private Sub frmListDirectories_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    '        If Not File.Exists(PutSlash(Application.StartupPath) & cDataFileName) Then Return
    '        Dim textFile() As String = File.ReadAllLines(PutSlash(Application.StartupPath) & cDataFileName)

    '        If textFile.Length > 0 Then
    '            For i As Integer = 0 To textFile.Length - 1
    '                lstDirectories.Items.Add(textFile(i))
    '            Next
    '        End If
    '    End Sub

    '#End Region

End Class